@extends('layouts.layouts')
@section('title')
    <title>视频页面</title>
@endsection
@section('content')

<div class="content">
        <div class="header">       
            <h1 class="page-title">视频列表</h1>
             <ul class="breadcrumb"></ul>
        </div>
        <div class="main-content">

<div class="btn-toolbar list-toolbar">
                <form class="form-inline" action="" method="get">
					<!-- <a href="/video/add"><button type="button" class="btn btn-primary"><i class="glyphicon glyphicon-home"></i> 添加视频</button></a> -->
          <a href="/qiniu/add"><button type="button" class="btn btn-primary"><i class="glyphicon glyphicon-home"></i> 七牛云添加视频</button></a>
                    <div class="form-group">
                        <input type="text" class="form-control" name="title" placeholder="课程链接标题" value="">
                    </div>
                    <button type="submit" class="btn btn-default">筛选</button>
                </form>
            </div>
 <div class="panel panel-default">

<div class="panel-heading no-collapse">视频列表<!-- <span class="label label-warning">+10</span> --></div>
<table class="table table-bordered table-striped">
  <thead>
    <tr>
      <th>序号</th>
      <th>视频名称</th>
      <th>视频地址</th>
      <th>状态</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
<div>
@foreach($list as $v)
		<tr>
				  <td>{{$v->id}}</td>
				  <td>{{$v->title}}</td>
				  <td><a href="{{$v->url}}" target="_blank">点击查看</a></td>
				  <td>@if($v->state == 1) 显示 @else 禁用 @endif</td>
				  <td width="30%">
					  <a href="/video/edit?id={{$v->id}}"><i class="fa fa-pencil"></i>编辑</a>&nbsp;|
					  <a href="/video/deleteVideo?id={{$v->id}}"><i class="fa fa-trash-o"></i>删除</a>&nbsp;|
                      @if($v->is_trans == 1)
                          <a class="videoTran" style="color:red;">&nbsp;已转码</a>
                      @else
                          <a href="/qiniu/result/{{$v->id}}">转码</a>&nbsp;
                      @endif
				<!--		@if($v->is_trans == 1)
						  <a  class="videoTran" style="color:red;">&nbsp;已转码</a>
						@else
							<a href="/transcoding/data?id='{{$v->id}}'&&url='{{$v->url}}'" class="videoTran">&nbsp;视频转码</a>
						@endif
					@if(!empty($v->old_url))
							&nbsp;| <a href="/video/delVideo?url={{$v->old_url}}&&id={{$v->id}}"><i class="fa fa-trash-o"></i>删除原视频</a>
					@endif-->
					
					  
					  
				  </td>
		</tr>
@endforeach
</div>

  </tbody>
</table>

</div>

<ul class="pagination">
{{$list->appends(['title'=>$title])->render()}}
</ul>
</div>


</div>



    <script src="lib/bootstrap/js/bootstrap.js"></script>
    <script>

        $(".link").click(function(){
           // console.log($(this).next());
            $(this).next().toggleClass('submenu1');
        })
		
    </script>
@endsection
